-
-
Notifications
You must be signed in to change notification settings - Fork 686
[18.0][MIG] hr_job_category: Migration to 18.0 #1415
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 18.0
Are you sure you want to change the base?
Conversation
[UPD] Update hr_job_category.pot [UPD] README.rst Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (4 of 4 strings) Translation: hr-14.0/hr-14.0-hr_job_category Translate-URL: https://translation.odoo-community.org/projects/hr-14-0/hr-14-0-hr_job_category/pt_BR/ Translated using Weblate (German) Currently translated at 100.0% (4 of 4 strings) Translation: hr-14.0/hr-14.0-hr_job_category Translate-URL: https://translation.odoo-community.org/projects/hr-14-0/hr-14-0-hr_job_category/de/ [UPD] Update hr_job_category.pot Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: hr-14.0/hr-14.0-hr_job_category Translate-URL: https://translation.odoo-community.org/projects/hr-14-0/hr-14-0-hr_job_category/
When updating the hr.contract we shouldn't remove already existing tags When you update the contract, you dont remove tags that are manually added
[BOT] post-merge updates
Currently translated at 100.0% (4 of 4 strings) Translation: hr-17.0/hr-17.0-hr_job_category Translate-URL: https://translation.odoo-community.org/projects/hr-17-0/hr-17-0-hr_job_category/it/
c4479e3
to
4bf96b3
Compare
employee.write({"category_ids": tags_to_add}) | ||
|
||
@api.model_create_multi | ||
def create(self, vals_list): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the create method in version 18 receives a list of vals as a parameter, it must be iterated to validate each record. Therefore, the method must be written as follows, otherwise it won't work.
def create(self, vals_list): | |
def create(self, vals_list): | |
res = super().create(vals_list) | |
for vals in vals_list: | |
if "job_id" in vals: | |
res._tag_employees(vals.get("job_id")) | |
return res |
4bf96b3
to
65da7b4
Compare
@luisDIXMIT, Please Review.it's done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's correct, LGTM!!
No description provided.